<% for @post in @posts %>
  <li class="video-blog-item" alt="<%= @post.id %>">
    <div class="video-blog-left">
      <div class="video-thumb-wrap">
        <span class="video-thumb">
          <%= link_to image_tag(post_poster_url(@post)), @post %>
        </span>
        <span class="video-time"><%= Time.at(@post.length).gmtime.strftime('%-M:%S') %></span>
      </div>
      <% if @watch == "Channel" and is_owner?(@post.user) %>
        <div id="video-privacy-<%= @post.id %>" class="video-blog-privacy">
          <%= render "privacy" %>
        </div>
      <% end %>
    </div>
    <div class="video-info-blog-wrap">
      <div class="video-info">
        <div class="video-user-avatar">
          <%= link_to image_tag(user_avatar_url(@post.user)), post_channel_path(@post.user.name) %>
        </div>
        <div class="video-post-info">
          <div class="video-post-info-inner">
            <span class="video-user-name"><%= link_to @post.user.name, post_channel_path(@post.user.name) %></span>
            <span class="video-post-date"><%= time_ago_in_words(@post.created_at) %> ago</span>
          </div>
          <div class="video-theme-group">
            <%= @post.category %>
            <%= post_subject_value(@post) %>
          </div>
        </div>
      </div>
      <div class="video-title" title="">
        <% if @post.category != "Speech" %>@ <% end %><%= @post.title %>
      </div>
      <div class="video-stat">
        <span class="video-view"><%= number_with_delimiter(@post.views) %> views</span>
        <span class="video-like">
          <%= number_with_delimiter(@post.likes.size) %>
          <%= image_tag "thumb_up.png" %>
        </span>
      </div>
      <div class="video-description">
        <div class="collapse-group">
          <span>Description: <%= truncate(@post.content, :length => 25) %></span>
          <div class="video-desc-details">
            <%= link_to "View More &raquo;".html_safe %>
          </div>
          <div class="collapse"><%= @post.content %></div>
        </div>
      </div>
    </div>
  </li>
<% end %>

